<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>我的优惠券</title>

	<link rel="stylesheet" href="__INDEX__/css/mui.min.css"  />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
</head>
<body>
	
	<div class="mui-content">
	    <ul class="myord_nav clearfix">
	    	<li {if $status==0}class="active"{/if}><a href="{:url('member/quan')}">全部</a></li>
	    	<li {if $status==1}class="active"{/if}><a href="{:url('member/quan',['status'=>1])}">未使用</a></li>
	    	<li {if $status==2}class="active"{/if}><a href="{:url('member/quan',['status'=>2])}">已使用</a></li>
	    	<li {if $status==3}class="active"{/if}><a href="{:url('member/quan',['status'=>3])}">已失效</a></li>
	    </ul>
	 <p id="no_record" style="color:#D6AA50;text-align: center;">暂无优惠券</p>
	  
	</div>
	{include file="public/bottom" /}
</body>
</html>
{include file="public/footer" /}
<script>
	function to_pay(oid){
		window.location="/index/member/pay_order?oid="+oid;
	}
	function to_comment(oid){
		window.location="/index/member/comment?oid="+oid;
	}
	function to_orders(oid){	
		window.location="/index/member/order_page?oid="+oid;
	}
	function up_state(oid){	
		$.ajax({
				url:"{:url('member/up_state')}",
				data:{
					oid:oid
				},
				type:"post",
				success: function(data) {
					layer.msg(data.msg,{time: 1000},function(){
						window.location.reload();
					});
				}
		})
	}
	
	function confirm_pay(id){
		layer.confirm('您确定付款？', {
			btn: ['确定', '取消'] //按钮
		}, function() {
			$.ajax({
				type:"post",
				url: "{:url('member/confirm_pay')}",
				data: {order_id : id},//表单数据
				success: function(data) {
					layer.msg(data.msg, {
					  icon: 1,
					  time: 1500 //2秒关闭（如果不配置，默认是3秒）
					}, function(){
						  if(data.code == 200) {
								location.reload();
						  }
					}); 
				}
			})
		})
	}
</script>